import { toSnakeLike } from "./internal/snake-like";

/**
 * Convert a string to kebab splitting words in lowercase.
 *
 * example:
 * ```
 * name-styles-is-a-good-library
 * ```
 *
 * @param {string} s source string
 * @return {string} converted result with kebab splitting words in lowercase.
 */
export function kebab(s: string): string {
    return toSnakeLike(s).replace(/_/g, "-");
}

export const hyphen = kebab;
